//
//  DrawLineVCViewController.m
//  FilamentDemo
//
//  Created by jerry on 2020/9/19.
//  Copyright © 2020 tencent. All rights reserved.
//

#import "DrawLineVC.h"
#import "FilamentRender.h"
#import "FilamentConvenientHeader.h"
#import "FilamentDebugTool.h"
#include <vector>
@interface DrawLineVC ()

@end

@implementation DrawLineVC

- (void)viewDidLoad {
  [super viewDidLoad];
  auto engine = self.render.engine;
  auto scene = self.render.scene;
  float4 color = {1, 1, 1, 1};
  for (float x=-1.0; x<1.0; x+=0.1) {
    for (float z=-1.0; z<1.0; z+=0.1) {
      std::vector<float3> points = {
        {x,0, z},
        {x, 0, z + 0.1}
      };
      scene->addEntity(FilamentDebugTool::generateLineEntity(points, color, engine));
//      break;
    }
//    break;
  }
  
//  for (float z=-1.0; z<1.0; z+=0.1) {
//    for (float x=-1.0; x<1.0; x+=0.1) {
//      std::vector<float3> points = {
//        {x,0, z},
//        {x + 0.1, 0, z}
//      };
//      scene->addEntity(FilamentDebugTool::generateLineEntity(points, color, engine));
//    }
//  }
//
  filament::TransformManager &tcm = engine->getTransformManager();
}



@end
